package com.ruoyi.system.mapper;

import com.ruoyi.system.domain.Renwu;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 任务Mapper接口
 * 
 * @author ruoyi
 * @date 2022-12-22
 */
@Mapper
public interface RenwuMapper 
{
    /**
     * 查询任务
     * 
     * @param renwuid 任务主键
     * @return 任务
     */
    public Renwu selectRenwuByRenwuid(String renwuid);

    /**
     * 查询任务列表
     * 
     * @param renwu 任务
     * @return 任务集合
     */
    public List<Renwu> selectRenwuList(Renwu renwu);

    /**
     * 新增任务
     * 
     * @param renwu 任务
     * @return 结果
     */
    public int insertRenwu(Renwu renwu);

    /**
     * 修改任务
     * 
     * @param renwu 任务
     * @return 结果
     */
    public int updateRenwu(Renwu renwu);

    /**
     * 删除任务
     * 
     * @param renwuid 任务主键
     * @return 结果
     */
    public int deleteRenwuByRenwuid(String renwuid);

    /**
     * 批量删除任务
     * 
     * @param renwuids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteRenwuByRenwuids(String[] renwuids);

    public List<Map<String,Object>>findShenhejiluByShiwuid(@Param("shiwuid") String ppShiwuId);

    public List<Map<String,Object>> findShenheListByDept(@Param("shenpidanweiid")String ppShenpidanweiId,
                                                         @Param("shenhezhuangtai")int ppShenhezhuangtai,
                                                         @Param("jigoumingcheng")String ppJigoumingcheng,
                                                         @Param("zhuanjiaxingming")String ppZhuanjiaxingming,
                                                         @Param("renwuxiafashijian1")String ppRenwuxiafashijian1,
                                                         @Param("renwuxiafashijian2")String ppRenwuxiafashijian2,
                                                         @Param("renwuwanchengshijian1")String ppRenwuwanchengshijian1,
                                                         @Param("renwuwanchengshijian2")String ppRenwuwanchengshijian2,
                                                         @Param("biandongleixing")String biandongleixing,
                                                         @Param("startindex")int ppStartIndex,
                                                         @Param("pagesize")int ppPageSize);

    int countShenheListByDept(@Param("shenpidanweiid")String ppShenpidanweiId,
                              @Param("shenhezhuangtai")int ppShenhezhuangtai,
                              @Param("jigoumingcheng")String ppJigoumingcheng,
                              @Param("zhuanjiaxingming")String ppZhuanjiaxingming,
                              @Param("renwuxiafashijian1")String ppRenwuxiafashijian1,
                              @Param("renwuxiafashijian2")String ppRenwuxiafashijian2,
                              @Param("renwuwanchengshijian1")String ppRenwuwanchengshijian1,
                              @Param("renwuwanchengshijian2")String ppRenwuwanchengshijian2,
                              @Param("biandongleixing")String biandongleixing);

    public List<Map<String,Object>> findZhuanliShenheListByDept(@Param("shenpidanweiid")String ppShenpidanweiId,
                                                                @Param("shenhezhuangtai")int ppShenhezhuangtai,
                                                                @Param("jigoumingcheng")String ppJigoumingcheng,
                                                                @Param("zhuanjiaxingming")String ppZhuanjiaxingming,
                                                                @Param("renwuxiafashijian1")String ppRenwuxiafashijian1,
                                                                @Param("renwuxiafashijian2")String ppRenwuxiafashijian2,
                                                                @Param("renwuwanchengshijian1")String ppRenwuwanchengshijian1,
                                                                @Param("renwuwanchengshijian2")String ppRenwuwanchengshijian2,
                                                                @Param("startindex")int ppStartIndex,
                                                                @Param("pagesize")int ppPageSize);

    int countZhuanliShenheListByDept(@Param("shenpidanweiid")String ppShenpidanweiId,
                                    @Param("shenhezhuangtai")int ppShenhezhuangtai,
                                    @Param("jigoumingcheng")String ppJigoumingcheng,
                                    @Param("zhuanjiaxingming")String ppZhuanjiaxingming,
                                     @Param("renwuxiafashijian1")String ppRenwuxiafashijian1,
                                     @Param("renwuxiafashijian2")String ppRenwuxiafashijian2,
                                     @Param("renwuwanchengshijian1")String ppRenwuwanchengshijian1,
                                     @Param("renwuwanchengshijian2")String ppRenwuwanchengshijian2);

    public Object findMaxOrdernumByShiwuId(@Param("shiwuid")String ppShiwuId);
}
